<?php $this->load->view('admin/header'); ?>

    <div class="main">
        <form  id="article_form" method="post" action="/index.php?d=admin&c=section&m=save" onsubmit="return check();">
            <div class="editor_box" style="margin-top: 10px;">
                <label>上传图片：</label>
                <input type="text" value="" id="litpic" name="img" class="txt width500">
                <div class="btn_box" style="width:auto; margin-top:0px;"><input onclick="showupwindow('litpic')" type="button"  value="上传" /></div>
            </div>
            <div class="editor_box" style="margin-top: 10px;">
                <label>文章内容：</label>
                <textarea style="width: 90%; height: 500px;" id="data" name="data"><?php echo $section_data['data'];?></textarea>
            </div>
            <div class="btn_box">
                <input type="hidden" value="" id="h_pic">
                <input type="hidden" value="<?php echo $section_data['classid'];?>" name="cid" />
                <input type="hidden" value="<?php echo $section_data['sectionid'];?>" name="sid" />
                <input type="submit"  value="保存" />
                <input type="button" onclick="fanhui()" value="返回" />
            </div>
        </form>
    </div>

    <script type="text/javascript">
        function showupwindow(id){
            $('#h_pic').val(id);
            $('body').append('<div style="width: 349px; height: 220px; margin-left: -175px; margin-top: -110px; top: 355px;" class="xheModal" id="div_up"><div class="xheModalTitle"><span title="关闭 (Esc)" class="xheModalClose" onclick="close_up()"></span>上传文件</div><div class="xheModalContent" style="height: 191px;"><iframe frameborder="0" style="width: 100%; height: 100%;" src="/static/xheditor/xheditor_plugins/multiupload/multiupload.html?watermark=0"></iframe></div></div>');
            $('#div_up').css('top', $(document).scrollTop() + (window.screen.availHeight / 2 - 80));
        }
        function close_up(){
            $('#div_up').remove();
        }
        function fanhui(){
            history.back();
        }

        function check()
        {
            if($('#data').val()=='')
            {
                alert('请输入内容');
                $('#data').focus();
                return false;
            }
            return true;
        }
    </script>

<?php $this->load->view('admin/footer'); ?>